//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __ELACHAR_H__
#define __ELACHAR_H__

#ifdef __cplusplus
extern "C" {
#endif
    _ELASTOS Boolean __cdecl _AChar_IsASCII(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsControl(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsDigit(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsLeadByte(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsLetter(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsLetterOrDigit(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsLower(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsNumber(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsPunctuation(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsUpper(_ELASTOS AChar ch);
    _ELASTOS Boolean __cdecl _AChar_IsWhiteSpace(_ELASTOS AChar ch);
    _ELASTOS AChar __cdecl _AChar_ToLower(_ELASTOS AChar ch);
    _ELASTOS AChar __cdecl _AChar_ToUpper(_ELASTOS AChar ch);

    _ELASTOS Boolean __cdecl _WChar_IsASCII(_ELASTOS WChar ch);
    _ELASTOS Boolean __cdecl _WChar_IsControl(_ELASTOS WChar ch);
    _ELASTOS Boolean __cdecl _WChar_IsDigit(_ELASTOS WChar ch);
    _ELASTOS Boolean __cdecl _WChar_IsLetter(_ELASTOS WChar ch);
    _ELASTOS Boolean __cdecl _WChar_IsLetterOrDigit(_ELASTOS WChar ch);
    _ELASTOS Boolean __cdecl _WChar_IsLower(_ELASTOS WChar ch);
    _ELASTOS Boolean __cdecl _WChar_IsNumber(_ELASTOS WChar ch);
    _ELASTOS Boolean __cdecl _WChar_IsPunctuation(_ELASTOS WChar ch);
    _ELASTOS Boolean __cdecl _WChar_IsUpper(_ELASTOS WChar ch);
    _ELASTOS Boolean __cdecl _WChar_IsWhiteSpace(_ELASTOS WChar ch);
    _ELASTOS WChar __cdecl _WChar_ToLower(_ELASTOS WChar ch);
    _ELASTOS WChar __cdecl _WChar_ToUpper(_ELASTOS WChar ch);
#ifdef __cplusplus
}
#endif

#ifdef __cplusplus

_ELASTOS_NAMESPACE_BEGIN

class Char
{
public:
     //---- AChar ----
    static Boolean IsASCII(AChar ch) {
        return _AChar_IsASCII(ch);
    }

    static Boolean IsControl(AChar ch) {
        return _AChar_IsControl(ch);
    }

    static Boolean IsDigit(AChar ch) {
        return _AChar_IsDigit(ch);
    }

    static Boolean IsLeadByte(AChar ch) {
        return _AChar_IsLeadByte(ch);
    }

    static Boolean IsLetter(AChar ch) {
        return _AChar_IsLetter(ch);
    }

    static Boolean IsLetterOrDigit(AChar ch) {
        return _AChar_IsLetterOrDigit(ch);
    }

    static Boolean IsLower(AChar ch) {
        return _AChar_IsLower(ch);
    }

    static Boolean IsNumber(AChar ch) {
        return _AChar_IsNumber(ch);
    }

    static Boolean IsPunctuation(AChar ch) {
        return _AChar_IsPunctuation(ch);
    }

    static Boolean IsUpper(AChar ch) {
        return _AChar_IsUpper(ch);
    }

    static Boolean IsWhiteSpace(AChar ch) {
        return _AChar_IsWhiteSpace(ch);
    }

    static AChar ToLower(AChar ch) {
        return _AChar_ToLower(ch);
    }

    static AChar ToUpper(AChar ch) {
        return _AChar_ToUpper(ch);
    }

    //---- WChar ----
    static Boolean IsASCII(WChar ch) {
        return _WChar_IsASCII(ch);
    }

    static Boolean IsControl(WChar ch) {
        return _WChar_IsControl(ch);
    }

    static Boolean IsDigit(WChar ch) {
        return _WChar_IsDigit(ch);
    }

    static Boolean IsLetter(WChar ch) {
        return _WChar_IsLetter(ch);
    }

    static Boolean IsLetterOrDigit(WChar ch) {
        return _WChar_IsLetterOrDigit(ch);
    }

    static Boolean IsLower(WChar ch) {
        return _WChar_IsLower(ch);
    }

    static Boolean IsNumber(WChar ch) {
        return _WChar_IsNumber(ch);
    }

    static Boolean IsPunctuation(WChar ch) {
        return _WChar_IsPunctuation(ch);
    }

    static Boolean IsUpper(WChar ch) {
        return _WChar_IsUpper(ch);
    }

    static Boolean IsWhiteSpace(WChar ch) {
        return _WChar_IsWhiteSpace(ch);
    }

    static WChar ToLower(WChar ch) {
        return _WChar_ToLower(ch);
    }

    static WChar ToUpper(WChar ch) {
        return _WChar_ToUpper(ch);
    }
};

_ELASTOS_NAMESPACE_END

#endif //!__cplusplus

#endif //__ELACHAR_H__
